package com.zack.designPattern.visitor;

import java.util.ArrayList;
import java.util.List;

public class VisiteesCollection {

	private List<Visitee> visitees;
	
	public VisiteesCollection(){
		this.visitees = new ArrayList<Visitee>();
	}
	
	public void addVisitee(Visitee ve){
		this.visitees.add(ve);
	}
	
	public void accept(Visitor v){
		for (Visitee visitee : visitees) {
			visitee.accept(v);
		}
	}
}
